<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ attribute name="id" type="java.lang.String" required="true" description="编号"%>
<%@ attribute name="readonly" type="java.lang.Boolean" required="false" description="是否查看模式"%>
<%@ attribute name="maxWidth" type="java.lang.String" required="false" description="最大宽度"%>
<%@ attribute name="labelValue" type="java.lang.String" required="true" description="输入框值（Name）"%>
<%@ attribute name="maxHeight" type="java.lang.String" required="false" description="最大高度"%>
<%@ attribute name="cssClass" type="java.lang.String" required="false" description="css样式"%>
<div class="input-append">
	<input id="${id}" name="${id}" ${allowInput?'':'readonly="readonly"'} type="text" value="${labelValue}" 
		class="${cssClass}" /><a id="${id}Button" onclick="${input}FinderOpen();"	 href="javascript:" class="btn ${disabled} ${hideBtn ? 'hide' : ''}" style="${smallBtn?'padding:4px 2px;':''}">&nbsp;<i class="icon-search"></i>&nbsp;</a>&nbsp;&nbsp;
</div>
<script type="text/javascript">
	function ${input}FinderOpen(){//<c:if test="${type eq 'thumb'}"><c:set var="ctype" value="images"/></c:if><c:if test="${type ne 'thumb'}"><c:set var="ctype" value="${type}"/></c:if>
		var url = "${ctxStatic}/map/proxy.jsp?api=template1000&CID=huiduo&tid=tid1000&width=600&height=400&zoom=10&control=2&cityName="+encodeURIComponent("厦门市");
		//windowOpen(url,"文件管理",1000,700);
		var nid = $("#${id}").val();
		if(nid != null && nid != "")
			url = url+"&nid="+nid;
		window.open (url, 'newwindow', 'height=500, width=700, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')
	}
	
	function setNid(nid){
		$("#${id}").val(nid);
	}
</script>